{extend name='user/public/layout' /}
{block name='content'}
<div class="ylj-box">
    {volist name="lists" id='vo' empty='暂无数据'}
    <div class="am-cf ylj-padding-t-b ylj-border-b">
        <div class="am-u-sm-8">
            <a href="{:url('Loupan/detail',['id'=>$vo['house_id']])}"><h3>{$vo.house.title}</h3></a>
            <p>{$vo.create_time|date='Y-m-d H:i:s',###}</p>
            <p>{$vo.house.average_price}元/平米</p>
        </div>
        <div class="am-u-sm-4 am-text-right">
            <a href="javascript:;" class="J_del" data-uri="{:url('user.collection/delete',['id'=>$vo['id']])}">取消</a>
        </div>
    </div>
    {/volist}
</div>
<div class="ylj-box ylj-padding-b">
    <div class="plastic_bottom_pages">
        {$pages}
    </div>
</div>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script>
    $(function(){
        $('.J_del').bind('click',function(){
            if(confirm('您确定要取消关注么？')){
                $.get($(this).data('uri'),function(res){
                    if(res.status == 1){
                        layer.msg(res.msg,{icon:1});
                        setTimeout(function(){window.location.reload();},2000);
                    }else{
                        layer.msg(res.msg,{icon:2});
                    }
                });
            }
        });
    });
</script>
{/block}